<template>
	<view>
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="backText"></block>
			<block slot="content">账单详情</block>
		</cu-custom>
		<view class="tc pt50" style="padding-bottom: 50rpx;background-color: #ff5e1f;">
			<view class="fs26 fw600">
				<image :src="imgurl+'/img11.png'" class="img36 mr10"></image>
				<text class="fs28 text-white fw600" v-text="tip">购物消费</text>
			</view>
			<view class="fs66 ff text-white" v-html="CommissionLog.CommissionMoney"><text class="fs26">元</text></view>
			<view class="fs26" style="margin-top: -10rpx; color: rgba(255,255,255,0.8);">交易成功</view>
		</view>
		<view class="qui-cells">
			<view class="qui-cell">
				<view class="cell-bd">
					<view class="fs30 fw600 mb20">来源说明</view>
					<view class="round fs26" v-html="CommissionLog.Msg"></view>
					
				</view>
			</view>
		</view>

		<view class="qui-cells mt15">
			<view class="qui-cell">
				<view class="cell-hd fs24 text-gray">
					<view>创建时间</view>
					<view class="mt20"  v-if="CommissionLog.PayOrderID != null">支付单号</view>
					<view class="mt20" v-if="CommissionLog.OrderID != null">购物单号</view>
				</view>
				<view class="cell-bd tr fs24">
					<view v-html="CommissionLog.CreateTime"></view>
					<view class="mt20" v-if="CommissionLog.PayOrderID != null" v-html="CommissionLog.PayOrderID" ></view>
					<view class="mt20" v-if="CommissionLog.OrderID != null" v-html="CommissionLog.OrderID" ></view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import base from 'utils/base.js';
	export default {
		data() {
			return {
				imgurl: this.$imgurl,
				CommissionLog: {},
				tip: ''
			};
		},
		onLoad: function(option) {
			this.GetSingleCommissionLog(option.ID);
			this.tip = unescape(option.tip);
		},
		methods: {
			tips: function() {},
			GetSingleCommissionLog: function(logid) {
				let currentPage = this;
	
				let params = {
					type: 'GET',
					url: '/api/UserInfo/GetSingleCommissionLog',
					data: {
						logID: logid
					},
					sCallback: function(response) {
						if (response.IsSuccess) {
							currentPage.CommissionLog = response.Data;
						} else {
							uni.showToast({
								title: response.Msg
							});
						}
					}
				};
				base.request(params);
			}
		}
	};
</script>

<style lang="scss">
	.img36 {
		width: 36rpx;
		height: 36rpx;
		position: relative;
		top: 6rpx;
	}

	.fs66 {
		font-size: 66rpx;
	}

	.round {
		
		&:before {
			content: '';
			display: inline-block;
			width: 14rpx;
			height: 14rpx;
			background-color: #FFFFFF;
			border: solid 3rpx #d1d1d1;
			border-radius: 50%;
			margin-right: 20rpx;
		}
	}
</style>
